/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package irsystem.scenario;

import java.util.ArrayList;
import java.util.List;

/**
 *
 * @author Cerulean
 */
public class ExperimentResult
{
    public static class ExperimentResultEntry
    {
        int queryID;
        List<Integer> docIDs;
        double NIAP;

        public ExperimentResultEntry(int queryID, List<Integer> docIDs, double NIAP)
        {
            this.queryID = queryID;
            this.docIDs = docIDs;
            this.NIAP = NIAP;
        }

        public List<Integer> getDocIDs()
        {
            return docIDs;
        }

        public double getNIAP()
        {
            return NIAP;
        }

        public int getQueryID()
        {
            return queryID;
        }
    }
    
    List<ExperimentResultEntry> results;

    public ExperimentResult()
    {
        results=new ArrayList<ExperimentResultEntry>();
    }
    
    public List<ExperimentResultEntry> getResults()
    {
        return results;
    }
    
    public ExperimentResultEntry getResult(int index)
    {
        return results.get(index);
    }
    
    public void addResult(ExperimentResultEntry entry)
    {
        results.add(entry);
    }
    
    public void addResult(int queryID,List<Integer> docIDs, double NIAP )
    {
        ExperimentResultEntry entry=new ExperimentResultEntry(queryID, docIDs, NIAP);
        results.add(entry);
    }
}